<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/10/16
  Time: 11:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        pageContext.setAttribute("user","page_user");//当前页面
        pageContext.setAttribute("user","request_user",PageContext.REQUSET_SCOPE);//一次请求
        pageContext.setAttribute("user","session_user",PageContext.SESSION_SCOPE);//一次会话
        pageContext.setAttribute("user","application_user",PageContext.APPLICATION_SCOPE);//整个应用
    %>
    <%
        String str = "";
        str = (String) pageContext.getAttribute("user","page_user");//当前页面
        str = (String) pageContext.getAttribute("user","request_user",PageContext.REQUSET_SCOPE);//一次请求
        str = (String) pageContext.getAttribute("user","session_user",PageContext.SESSION_SCOPE);//一次会话
        str = (String) pageContext.getAttribute("user","application_user",PageContext.APPLICATION_SCOPE);//整个应用
    %>
    <%=
        str
    %>
</body>
</html>
